<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>btn-animation</title>
</head>
<style>
    html,
    body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
    }

    .btn {
        background: transparent;
        border: 1px solid palegreen;
        color: palegreen;
        padding: 10px 20px;
        font-weight: 1000;
        overflow: hidden;
    }

    btn:hover {
        color: white;
    }

    .btn::before {
        content: "";
        display: block;
        width: 0px;
        height: 40px;
        background: palegreen;
        position: absolute;
        top: 0;
        left: -30px;
        transform: skewX(45deg);
        transition: all 1s;
        z-index: -1;
    }


    .btn:hover::before {
        width: 200px;
    }
</style>

<body>

    <button class="btn">btn-animation</button>

</body>

</html>